﻿using System;
using System.Windows.Forms;

namespace ruscehproj2
{
    public partial class bk006 : Form
    {
        int i = 1;
        int i2 = 1;
        int i3 = 2;
        int i4 = 1;
        public bk006()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.i++;
            if (this.i > 4) this.i = 1;
           // if (this.i != 1) pictureBox1.Visible = true;
           // else pictureBox1.Visible = false;
            switch (this.i)
            {
                case 1: button1.BackgroundImage = Resources.set01; break;
                case 2: button1.BackgroundImage = Resources.set02; break;
                case 3: button1.BackgroundImage = Resources.set03; break;
                case 4: button1.BackgroundImage = Resources.set04; break;
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {      
            this.i3++;
            if (this.i3 > 9) this.i3 = 1;
         //  if (this.i3 != 1) pictureBox2.Visible = true;
          //  else pictureBox2.Visible = false;

            switch (this.i3)
            {
                case 1: button3.BackgroundImage = Resources.set1; break;
                case 2: button3.BackgroundImage = Resources.set2; break;
                case 3: button3.BackgroundImage = Resources.set3; break;
                case 4: button3.BackgroundImage = Resources.set4; break;
                case 5: button3.BackgroundImage = Resources.set5; break;
                case 6: button3.BackgroundImage = Resources.set6; break;
                case 7: button3.BackgroundImage = Resources.set7; break;
                case 8: button3.BackgroundImage = Resources.set8; break;
                case 9: button3.BackgroundImage = Resources.set9; break;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.i2++;
            if (this.i2 > 3) this.i2 = 1;
           
            switch (this.i2)
            {
                case 1: button2.BackgroundImage = Resources.set4; break;
                case 2: button2.BackgroundImage = Resources.set5; break;
                case 3: button2.BackgroundImage = Resources.set6; break;
               }
        }

        private void button4_Click(object sender, EventArgs e)
        {
            this.i4++;
            if (this.i4 > 3) this.i4 = 1;

            switch (this.i4)
            {
                case 1: button4.BackgroundImage = Resources.set4; break;
                case 2: button4.BackgroundImage = Resources.set5; break;
                case 3: button4.BackgroundImage = Resources.set6; break;
            }
        }

        private void Form3_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.Hide();
            }
        }
    }
}
